
//锚点跳转滑动效果		
$('a[href*=#x],area[href*=#x]').click(function() {
	if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
		var $target = $(this.hash);
		$target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']');
		if ($target.length) {
			var targetOffset = $target.offset().top;
			$('html,body').animate({
				scrollTop: targetOffset
			},1000);
			return false;
		}
	}
});	
		
//浮动导航
function float_nav(dom){
	var right_nav=$(dom);
	var nav_height=right_nav.height();
	function right_nav_position(bool){
		var window_height=$(window).height();
		var nav_top=((window_height-nav_height)/2)+40;
		if(bool){
			right_nav.stop(true,false).animate({top:nav_top+$(window).scrollTop()},0);
		}else{
			right_nav.stop(true,false).animate({top:nav_top},0);
		}	
		right_nav.show();
	}
	
	if(!+'\v1' && !window.XMLHttpRequest ){
		$(window).bind('scroll resize',function(){
			if($(window).scrollTop()>-1){
				right_nav_position(true);			
			}else{
				right_nav.hide();				
			}
		})
	}else{
		$(window).bind('scroll resize',function(){
			if($(window).scrollTop()>-1){
				right_nav_position();
			}else{
				right_nav.hide();				
			}
		})
	}	
	
	right_nav_position(true);
}
		
float_nav('#float');
float_nav('#left_nav');
$(".aa1").each(function(){
	if($(this).children("span").html() != ""){
		$(this).css({
			"display":"block"
		})
	}
});



